<div class="purchases form">
<?php echo $this->Form->create('Purchase');?>
	<fieldset>
		<legend><?php __('Nueva Compra'); ?></legend>
	<?php
		echo $this->Form->input('purchase_date', array('label' => 'Fecha de Compra', 'type' => 'text'));
		echo $this->Form->input('purchase_amount', array('label' => 'Cantidad'));
		echo $this->Form->input('article_id', array('label' => 'Articulo'));
		echo $this->Form->input('supplier_id', array('label' => 'Proveedor'));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Crear', true));?>
</div>
<!--<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('List Purchases', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('List Articles', true), array('controller' => 'articles', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Article', true), array('controller' => 'articles', 'action' => 'add')); ?> </li>
	</ul>
</div>-->
<script type="text/javascript">
    (function($){
        // Date picker
        $("#PurchasePurchaseDate").datepicker({
            //yearRange: '1970:2010',
            defaultDate: new Date(),
            dateFormat: 'dd/mm/yy',
            changeMonth: true,
            changeYear: true
        });
        
        //toda la documentacion de esta librería la encontras aca
        //http://jqueryui.com/demos/datepicker/
    })(jQuery);
</script>